<ul class="nav nav-tabs nav-stacked">
    <?php if (in_array('user/user/index', $path)) { ?>
        <li <?php if ($_SERVER['REQUEST_URI'] == '/user/user/index') echo 'class="on"' ?>><a
                href="/user/user/index">用户管理</a>
        </li>
    <?php } ?>
    <?php if (in_array('user/news/index', $path)) { ?>
        <li <?php if ($_SERVER['REQUEST_URI'] == '/user/news/index') echo 'class="on"' ?>><a
                href="/user/news/index">消息管理</a>
        </li>
    <?php } ?>
    <?php if (in_array('user/news/index', $path)) { ?>
        <li <?php if ($_SERVER['REQUEST_URI'] == '/user/mock-user/index') echo 'class="on"' ?>><a
                href="/user/mock-user/index">模考用户</a>
        </li>
    <?php } ?>
    <?php if (in_array('user/plan/index', $path)) { ?>
        <li <?php if ($_SERVER['REQUEST_URI'] == '/user/plan/index') echo 'class="on"' ?>><a
                href="/user/plan/index">考试计划</a>
        </li>
    <?php } ?>
</ul>
<style>
    .on {
        background: #DEDADA;
    }
</style>
